package com.wman.learn.basic

import kotlin.reflect.KClass

/**
 * @ProjectName: wman
 * @Package: com.wman
 * @ClassName: Test
 * @Description: 与Java互相调用
 * @Author: wman
 * @CreateDate: 2019/11/13 15:04
 * @UpdateUser: 更新者
 * @UpdateDate: 2019/11/13 15:04
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */

fun echo(str: String) {
    println("$str")
}

fun testClass(clazz: Class<JavaBasic>) {
    println(clazz.simpleName)
}

//class调用
fun testClass(clazz: KClass<Kotlin03>) {
    println(clazz.simpleName)
}

object Kotlin03 {
    @JvmStatic
    fun message(str: String?) {
        println("$str")
    }
}

fun main(args: Array<String>) {
    Kotlin03.message("单例模式")
    //java方法调用
    testClass(JavaBasic::class.java)
    testClass(Kotlin03::class)
    //关键字处理
    echo(JavaBasic.`in`)
}

